package com.weixiaoit.web;


import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.weixiaoit.entity.Province;
import com.weixiaoit.service.ProvinceService;

public class TableSerlet extends HttpServlet {

	private static final long serialVersionUID = 1L;
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		ProvinceService service =new ProvinceService();
		List<Province> proList=service.findAll();
		HttpSession session=request.getSession();
		session.setAttribute("provinceList", proList);
		request.getRequestDispatcher("/WEB-INF/views/test.jsp").forward(request, response);
		
		

}
}

